//
//  MrMIDISearchCell.m
//  MIDI
//
//  Created by EMG on 15/9/12.
//  Copyright (c) 2015年 QXSX. All rights reserved.
//

#import "MrMIDISearchCell.h"
#import "CommFunc.h"

@interface MrMIDISearchCell()

@property (weak, nonatomic) IBOutlet UILabel *titleUILabel;

@property (weak, nonatomic) IBOutlet UILabel *discriptionUILabel;


@end

@implementation MrMIDISearchCell

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    //[super setSelected:selected animated:animated];

    // Configure the view for the selected state
}
+ (instancetype)cellWithTableView:(UITableView *)tableView
{
    static NSString *ID = @"MrMIDISearchCell";
    MrMIDISearchCell *cell = [tableView dequeueReusableCellWithIdentifier:ID];
    if (cell == nil) {
        
        cell = [[[NSBundle mainBundle] loadNibNamed:ID owner:nil options:nil]firstObject];
    }
    
    return cell;
}

-(int)getHeight
{
    int height = [CommFunc sizeWithString:self.introLb.text
                                     font:[UIFont fontWithName:@"Hiragino Sans GB" size:10]
                                      max:CGSizeMake(self.introLb.frame.size.width, MAXFLOAT)].height;
    
    if (height <= 0)
        return 90;
    else
    {
        height = self.introLb.frame.origin.y + height + 32;
        
//        height = self.infoView.frame.origin.y + self.infoView.frame.size.height +
//        11 + height + 32;
        
        return height;
    }
    
    return 0;
}


@end




















